<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <title>2_事件对象</title>
        <script type="text/javascript" src="../js/vue.js"></script>
    </head>
    <body>
        <div id="demo">
            <button @click="showMsg">点我提示信息</button>
        </div>
    </body>

    <script type="text/javascript">
        Vue.config.productionTip = false;

        new Vue({
            el: '#demo',
            methods: {
                showMsg(e){
                    alert(e.target.innerText)
                }
            }
        })
        
    </script>
</html>